<template>
  <div>
    <el-row :gutter="12">
      <el-col :span="6">
        <el-card :body-style="{ padding: '0px' ,height: '300px' }" shadow="always">
          <img src="../../assets/images/eeds/img_eeds_1.jpeg" class="image">
          <div style="padding: 14px;">
            <span>鄂尔多斯XX电厂1</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
              <el-button type="text" class="button">操作按钮</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card :body-style="{ padding: '0px' ,height: '300px'}" shadow="hover">
          <img src="../../assets/images/eeds/img_eeds_2.jpeg" class="image">
          <div style="padding: 14px;">
            <span>鄂尔多斯XXX厂2</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
              <el-button type="text" class="button">操作按钮</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
    <el-row :gutter="12">
      <el-col :span="6">
        <el-card :body-style="{ padding: '0px' ,height: '300px'}" shadow="hover">
          <dplayer ref="dplayer" :dplayer-data="dplayerData"></dplayer>
          <div style="padding: 14px;">
            <span>鄂尔多斯XX电厂1</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
              <el-button type="text" class="button">操作按钮</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import dplayer from '@/components/DPlayer.vue'
export default {
  name: "demo-img-video",
  data() {
    return {
      currentDate: new Date(),
      dplayerData: {
        style: 'width:100%;height:330px;'
      },
      info: {
        video: require('../../assets/videos/eeds/video_eeds_1.mp4'),
        pic: ''
      }
    };
  },
  components: {
    dplayer
  },
  created() {
    setTimeout(()=>{
      this.switchVideo()
    },2000)
  },
  methods: {
    switchVideo() {
      this.$refs.dplayer.switchVideo(this.info)
    }
  }



}
</script>

<style scoped>
.time {
  font-size: 13px;
  color: #999;
}

.bottom {
  margin-top: 13px;
  line-height: 12px;
}

.button {
  padding: 0;
  float: right;
}

.image {
  width: 100%;
  height: 100%;
  display: block;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both
}
</style>
